package com.test.test_rest.blockchain_data.domain.gen;

import java.io.Serializable;
import java.math.BigDecimal;

public class SuperSymbolTab implements Serializable {
    private Long id;

    /**
     * 开盘价
     */
    private BigDecimal open;

    /**
     * 收盘价（当K线为最晚的一根时，是最新成交价）
     */
    private BigDecimal close;

    /**
     * 最低价
     */
    private BigDecimal low;

    /**
     * 最高价
     */
    private BigDecimal high;

    /**
     * 成交量
     */
    private BigDecimal amount;

    /**
     * 成交额, 即 sum(每一笔成交价 * 该笔的成交量)
     */
    private BigDecimal vol;

    /**
     * 成交笔数
     */
    private Long count;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 开盘价
     */
    public BigDecimal getOpen() {
        return open;
    }

    /**
     * 开盘价
     */
    public void setOpen(BigDecimal open) {
        this.open = open;
    }

    /**
     * 收盘价（当K线为最晚的一根时，是最新成交价）
     */
    public BigDecimal getClose() {
        return close;
    }

    /**
     * 收盘价（当K线为最晚的一根时，是最新成交价）
     */
    public void setClose(BigDecimal close) {
        this.close = close;
    }

    /**
     * 最低价
     */
    public BigDecimal getLow() {
        return low;
    }

    /**
     * 最低价
     */
    public void setLow(BigDecimal low) {
        this.low = low;
    }

    /**
     * 最高价
     */
    public BigDecimal getHigh() {
        return high;
    }

    /**
     * 最高价
     */
    public void setHigh(BigDecimal high) {
        this.high = high;
    }

    /**
     * 成交量
     */
    public BigDecimal getAmount() {
        return amount;
    }

    /**
     * 成交量
     */
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    /**
     * 成交额, 即 sum(每一笔成交价 * 该笔的成交量)
     */
    public BigDecimal getVol() {
        return vol;
    }

    /**
     * 成交额, 即 sum(每一笔成交价 * 该笔的成交量)
     */
    public void setVol(BigDecimal vol) {
        this.vol = vol;
    }

    /**
     * 成交笔数
     */
    public Long getCount() {
        return count;
    }

    /**
     * 成交笔数
     */
    public void setCount(Long count) {
        this.count = count;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", open=").append(open);
        sb.append(", close=").append(close);
        sb.append(", low=").append(low);
        sb.append(", high=").append(high);
        sb.append(", amount=").append(amount);
        sb.append(", vol=").append(vol);
        sb.append(", count=").append(count);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SuperSymbolTab other = (SuperSymbolTab) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOpen() == null ? other.getOpen() == null : this.getOpen().equals(other.getOpen()))
            && (this.getClose() == null ? other.getClose() == null : this.getClose().equals(other.getClose()))
            && (this.getLow() == null ? other.getLow() == null : this.getLow().equals(other.getLow()))
            && (this.getHigh() == null ? other.getHigh() == null : this.getHigh().equals(other.getHigh()))
            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
            && (this.getVol() == null ? other.getVol() == null : this.getVol().equals(other.getVol()))
            && (this.getCount() == null ? other.getCount() == null : this.getCount().equals(other.getCount()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOpen() == null) ? 0 : getOpen().hashCode());
        result = prime * result + ((getClose() == null) ? 0 : getClose().hashCode());
        result = prime * result + ((getLow() == null) ? 0 : getLow().hashCode());
        result = prime * result + ((getHigh() == null) ? 0 : getHigh().hashCode());
        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
        result = prime * result + ((getVol() == null) ? 0 : getVol().hashCode());
        result = prime * result + ((getCount() == null) ? 0 : getCount().hashCode());
        return result;
    }
}